package com.ruoyi.web.controller.wx_driver;

import com.ruoyi.common.constant.VQMSConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.vqms.domain.VQMSQueue;
import com.ruoyi.vqms.domain.VQMSQueueArea;
import com.ruoyi.vqms.service.IVQMSQueueAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 司机获取排队仓库信息
 */
@RestController
@RequestMapping("/wx/queueArea")
public class QueueAreaController extends BaseController {

    @Autowired
    private IVQMSQueueAreaService queueAreaService;


    /**
     * 查询排队仓库列表
     */
    @RequestMapping("/list")
    public AjaxResult list(VQMSQueueArea vqmsQueueArea){

        return AjaxResult.success(queueAreaService.selectList(vqmsQueueArea));
    }

    /**
     * 根据排队队列id查询绑定库位
     */
    @GetMapping("/locationList/{id}")
    public AjaxResult locationList(@PathVariable Long id){
        return AjaxResult.success(queueAreaService.getByQueueAreaId(id));
    }

}
